Skip to content

Conversation

@karlseguin
Copy link
Collaborator

Currently, fetch --dump includes <script> tag (either inline or with src). I don't know what use-case this is the desired behavior. Excluding them, via the new --noscript option has benefit that if you --dump --noscript and open the resulting page in the browser, you don't re-execute JavaScript, which is likely to break the page.

For example, opening a --dump of github makes it look like the page is broken because it re-executes JavaScript that isn't meant to be re-executed.

Similarly, opening a --dump in a browser might execute JavaScript that lightpanda browser failed to execute, making it looks like it worked better than it did.

Currently, fetch --dump includes <script> tag (either inline or with src). I
don't know what use-case this is the desired behavior. Excluding them, via the
new --noscript option has benefit that if you --dump --noscript and open the
resulting page in the browser, you don't re-execute JavaScript, which is
likely to break the page.

For example, opening a --dump of github makes it look like the page is broken
because it re-executes JavaScript that isn't meant to be re-executed.

Similarly, opening a --dump in a browser might execute JavaScript that
lightpanda browser failed to execute, making it looks like it worked better
than it did.
@karlseguin
Copy link
Collaborator Author

@francisbouvier Any thought on making this the default?

@francisbouvier
Copy link
Member

I agree with you, I don't see the use case to have JS script in the dump.
Do we make this the default? It will change the behaviour but it just makes more sense to me.

PR LGMT

@karlseguin karlseguin merged commit a74f791 into main Jul 15, 2025
10 checks passed
@karlseguin karlseguin deleted the dump_noscript branch July 15, 2025 13:22
@github-actions github-actions bot locked and limited conversation to collaborators Jul 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants